def parse_display_field( field ):
	""" Returns a tuple of the form (display_field, formatted) where formatted is a boolean. """
	if field.startswith('+'):
		return (field[1:], True)
	elif field.startswith('-'):
		field = field[1:]
	return (field, False)

def parse_sort_field( field ):
	""" Returns a tuple of the form (sort_field, descending) where descending is a boolean. """
	if field.startswith('-'):
		return (field[1:], True)
	elif field.startswith('+'):
		field = field[1:]
	return (field, False)
